package by.yakusekmaxim.bookgid.dataaccess;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import by.yakusekmaxim.bookgid.dataaccess.util.Filter;
import by.yakusekmaxim.bookgid.datamodel.Book;

public interface BookDao extends AbstractDao<Long, Book> {

	Long getCount();

	Long getCount(final SingularAttribute<Book, ?> attribute, Object value);

	List<Book> getAllBooks();
	
	List<Book> getAllBooks(SingularAttribute<Book, ?> attribute ,Object value);

	List<Book> getAllBooks(SingularAttribute<Book, ?> attr, boolean ascending,
			int startRecord, int pageSize);

	List<Book> getAllBooksByName(String name);

	List<Book> getAllProductsWithImages();

	List<Book> getAllBook(SingularAttribute<Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize);

	List<Book> getAllBook(SingularAttribute<Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize,
			Filter<Book> filter);
	
	List<Book> getAllPublicBook(SingularAttribute<Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize);

	List<Book> getAllPublicBook(SingularAttribute<Book, ?> attribute,
			boolean ascending, int startRecord, int pageSize,
			Filter<Book> filter);

}
